<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Aria: ArDeviceConnection Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Aria
   &#160;<span id="projectnumber">2.9.4</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classArDeviceConnection.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="#pro-static-attribs">Static Protected Attributes</a> &#124;
<a href="classArDeviceConnection-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ArDeviceConnection Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p>Base class for device connections.  
 <a href="classArDeviceConnection.html#details">More...</a></p>

<p><code>#include &lt;ArDeviceConnection.h&gt;</code></p>

<p>Inherited by <a class="el" href="classArFileDeviceConnection.html">ArFileDeviceConnection</a>, <a class="el" href="classArLogFileConnection.html">ArLogFileConnection</a>, <a class="el" href="classArSerialConnection.html">ArSerialConnection</a>, and <a class="el" href="classArTcpConnection.html">ArTcpConnection</a>.</p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a347c85b1f6dad521cabfbca6833712ab"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArDeviceConnection.html#a347c85b1f6dad521cabfbca6833712ab">Status</a> { <br />
&#160;&#160;<a class="el" href="classArDeviceConnection.html#a347c85b1f6dad521cabfbca6833712aba2a32337db15deac68c28c6c6073614f8">STATUS_NEVER_OPENED</a> = 1, 
<a class="el" href="classArDeviceConnection.html#a347c85b1f6dad521cabfbca6833712abaab61fc67dfa26013b7940bbac62449da">STATUS_OPEN</a>, 
<a class="el" href="classArDeviceConnection.html#a347c85b1f6dad521cabfbca6833712aba57899a6a6454d556eb07b44d26d09ab2">STATUS_OPEN_FAILED</a>, 
<a class="el" href="classArDeviceConnection.html#a347c85b1f6dad521cabfbca6833712abad66561776078f16b133e18a67a31a6b2">STATUS_CLOSED_NORMALLY</a>, 
<br />
&#160;&#160;<a class="el" href="classArDeviceConnection.html#a347c85b1f6dad521cabfbca6833712aba3d77512ad91a4c2ff4c57ead86546aaf">STATUS_CLOSED_ERROR</a>
<br />
 }</td></tr>
<tr class="separator:a347c85b1f6dad521cabfbca6833712ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a17585f2fab7b9fb61d2308400f909c30"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArDeviceConnection.html#a17585f2fab7b9fb61d2308400f909c30">ArDeviceConnection</a> ()</td></tr>
<tr class="memdesc:a17585f2fab7b9fb61d2308400f909c30"><td class="mdescLeft">&#160;</td><td class="mdescRight">constructor  <a href="#a17585f2fab7b9fb61d2308400f909c30">More...</a><br /></td></tr>
<tr class="separator:a17585f2fab7b9fb61d2308400f909c30"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f701354a3cecec9e0b209a27e434f54"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArDeviceConnection.html#a9f701354a3cecec9e0b209a27e434f54">close</a> (void)</td></tr>
<tr class="memdesc:a9f701354a3cecec9e0b209a27e434f54"><td class="mdescLeft">&#160;</td><td class="mdescRight">Closes the connection.  <a href="#a9f701354a3cecec9e0b209a27e434f54">More...</a><br /></td></tr>
<tr class="separator:a9f701354a3cecec9e0b209a27e434f54"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac1be3e25473f65f096b303b600248622"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac1be3e25473f65f096b303b600248622"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArDeviceConnection.html#ac1be3e25473f65f096b303b600248622">debugBytesRead</a> (int bytesRead)</td></tr>
<tr class="memdesc:ac1be3e25473f65f096b303b600248622"><td class="mdescLeft">&#160;</td><td class="mdescRight">Notifies the device connection that some bytes were read (should call with 0 if it read but got no bytes) <br /></td></tr>
<tr class="separator:ac1be3e25473f65f096b303b600248622"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac2e625974ec5c4e2b117a42b344b0d6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aac2e625974ec5c4e2b117a42b344b0d6"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArDeviceConnection.html#aac2e625974ec5c4e2b117a42b344b0d6">debugEndPacket</a> (bool goodPacket, int type=0)</td></tr>
<tr class="memdesc:aac2e625974ec5c4e2b117a42b344b0d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Notifies the device connection that the end of a packet was read, which will cause log messages if set to do so. <br /></td></tr>
<tr class="separator:aac2e625974ec5c4e2b117a42b344b0d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a35b08f34c720cde344ec8179ec162397"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a35b08f34c720cde344ec8179ec162397"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArDeviceConnection.html#a35b08f34c720cde344ec8179ec162397">debugStartPacket</a> (void)</td></tr>
<tr class="memdesc:a35b08f34c720cde344ec8179ec162397"><td class="mdescLeft">&#160;</td><td class="mdescRight">Notifies the device connection that the start of a packet is trying to be read. <br /></td></tr>
<tr class="separator:a35b08f34c720cde344ec8179ec162397"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad734f6fdd5d4ad8ae2d3f66a64ea3689"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad734f6fdd5d4ad8ae2d3f66a64ea3689"></a>
const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArDeviceConnection.html#ad734f6fdd5d4ad8ae2d3f66a64ea3689">getDeviceName</a> (void) const </td></tr>
<tr class="memdesc:ad734f6fdd5d4ad8ae2d3f66a64ea3689"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the device type (what this is connecting to) <br /></td></tr>
<tr class="separator:ad734f6fdd5d4ad8ae2d3f66a64ea3689"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1468143d5b41948b64d80cebce07c6f3"><td class="memItemLeft" align="right" valign="top">virtual const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArDeviceConnection.html#a1468143d5b41948b64d80cebce07c6f3">getOpenMessage</a> (int messageNumber)=0</td></tr>
<tr class="memdesc:a1468143d5b41948b64d80cebce07c6f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the string of the message associated with opening the device.  <a href="#a1468143d5b41948b64d80cebce07c6f3">More...</a><br /></td></tr>
<tr class="separator:a1468143d5b41948b64d80cebce07c6f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2e3294feb37c8c20020bf81f44826dd3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2e3294feb37c8c20020bf81f44826dd3"></a>
const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArDeviceConnection.html#a2e3294feb37c8c20020bf81f44826dd3">getPortName</a> (void) const </td></tr>
<tr class="memdesc:a2e3294feb37c8c20020bf81f44826dd3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the port name. <br /></td></tr>
<tr class="separator:a2e3294feb37c8c20020bf81f44826dd3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa2068c040aa79530914cc1402328a937"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa2068c040aa79530914cc1402328a937"></a>
const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArDeviceConnection.html#aa2068c040aa79530914cc1402328a937">getPortType</a> (void) const </td></tr>
<tr class="memdesc:aa2068c040aa79530914cc1402328a937"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the port type. <br /></td></tr>
<tr class="separator:aa2068c040aa79530914cc1402328a937"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3055120833c70ca8ba277040f0821d6f"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArDeviceConnection.html#a3055120833c70ca8ba277040f0821d6f">getStatus</a> (void)=0</td></tr>
<tr class="memdesc:a3055120833c70ca8ba277040f0821d6f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the status of the connection, which is one of the enum status.  <a href="#a3055120833c70ca8ba277040f0821d6f">More...</a><br /></td></tr>
<tr class="separator:a3055120833c70ca8ba277040f0821d6f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac0570caa674aceb844a25f29760a7315"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArDeviceConnection.html#ac0570caa674aceb844a25f29760a7315">getStatusMessage</a> (int messageNumber) const </td></tr>
<tr class="memdesc:ac0570caa674aceb844a25f29760a7315"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the description string associated with the status.  <a href="#ac0570caa674aceb844a25f29760a7315">More...</a><br /></td></tr>
<tr class="separator:ac0570caa674aceb844a25f29760a7315"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92e9eb8baf15711a5984453f4e35451d"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classArTime.html">ArTime</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArDeviceConnection.html#a92e9eb8baf15711a5984453f4e35451d">getTimeRead</a> (int index)=0</td></tr>
<tr class="memdesc:a92e9eb8baf15711a5984453f4e35451d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the time data was read in.  <a href="#a92e9eb8baf15711a5984453f4e35451d">More...</a><br /></td></tr>
<tr class="separator:a92e9eb8baf15711a5984453f4e35451d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aacdcacf3635432296e6a5cf8f08e7e50"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArDeviceConnection.html#aacdcacf3635432296e6a5cf8f08e7e50">isTimeStamping</a> (void)=0</td></tr>
<tr class="memdesc:aacdcacf3635432296e6a5cf8f08e7e50"><td class="mdescLeft">&#160;</td><td class="mdescRight">sees if timestamping is really going on or not  <a href="#aacdcacf3635432296e6a5cf8f08e7e50">More...</a><br /></td></tr>
<tr class="separator:aacdcacf3635432296e6a5cf8f08e7e50"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab6cb9cb2f71af3b98e249db6dd2ff34e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab6cb9cb2f71af3b98e249db6dd2ff34e"></a>
virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArDeviceConnection.html#ab6cb9cb2f71af3b98e249db6dd2ff34e">openSimple</a> (void)=0</td></tr>
<tr class="memdesc:ab6cb9cb2f71af3b98e249db6dd2ff34e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Opens the connection again, using the values from setLocation or. <br /></td></tr>
<tr class="separator:ab6cb9cb2f71af3b98e249db6dd2ff34e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0c7aa57e4734df6287c0393bdf7c186f"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArDeviceConnection.html#a0c7aa57e4734df6287c0393bdf7c186f">read</a> (const char *data, unsigned int size, unsigned int msWait=0)=0</td></tr>
<tr class="memdesc:a0c7aa57e4734df6287c0393bdf7c186f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads data from connection.  <a href="#a0c7aa57e4734df6287c0393bdf7c186f">More...</a><br /></td></tr>
<tr class="separator:a0c7aa57e4734df6287c0393bdf7c186f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad513aff91486cb69d9fc8a88a04ad1e9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad513aff91486cb69d9fc8a88a04ad1e9"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArDeviceConnection.html#ad513aff91486cb69d9fc8a88a04ad1e9">setDeviceName</a> (const char *deviceName)</td></tr>
<tr class="memdesc:ad513aff91486cb69d9fc8a88a04ad1e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the device type (what this is connecting to) <br /></td></tr>
<tr class="separator:ad513aff91486cb69d9fc8a88a04ad1e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac9557146fcc027bef433c0d3807e82fa"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArDeviceConnection.html#ac9557146fcc027bef433c0d3807e82fa">write</a> (const char *data, unsigned int size)=0</td></tr>
<tr class="memdesc:ac9557146fcc027bef433c0d3807e82fa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes data to connection.  <a href="#ac9557146fcc027bef433c0d3807e82fa">More...</a><br /></td></tr>
<tr class="separator:ac9557146fcc027bef433c0d3807e82fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5a3dd1cd4140ac04b4229dde26edf9de"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArDeviceConnection.html#a5a3dd1cd4140ac04b4229dde26edf9de">writePacket</a> (<a class="el" href="classArBasePacket.html">ArBasePacket</a> *packet)</td></tr>
<tr class="memdesc:a5a3dd1cd4140ac04b4229dde26edf9de"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes data to connection.  <a href="#a5a3dd1cd4140ac04b4229dde26edf9de">More...</a><br /></td></tr>
<tr class="separator:a5a3dd1cd4140ac04b4229dde26edf9de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a620e4464627f5f898d212eb11661f150"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a620e4464627f5f898d212eb11661f150"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArDeviceConnection.html#a620e4464627f5f898d212eb11661f150">~ArDeviceConnection</a> ()</td></tr>
<tr class="memdesc:a620e4464627f5f898d212eb11661f150"><td class="mdescLeft">&#160;</td><td class="mdescRight">destructor also forces a close on the connection <br /></td></tr>
<tr class="separator:a620e4464627f5f898d212eb11661f150"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a9a74569c1d73e65d215a80dbdc1b3394"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9a74569c1d73e65d215a80dbdc1b3394"></a>
static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArDeviceConnection.html#a9a74569c1d73e65d215a80dbdc1b3394">debugShouldLog</a> (bool shouldLog)</td></tr>
<tr class="memdesc:a9a74569c1d73e65d215a80dbdc1b3394"><td class="mdescLeft">&#160;</td><td class="mdescRight">Makes all device connections so that they'll dump data. <br /></td></tr>
<tr class="separator:a9a74569c1d73e65d215a80dbdc1b3394"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a776d6ae9b073c01388089c373b38d2f7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a776d6ae9b073c01388089c373b38d2f7"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>buildStrMap</b> (void)</td></tr>
<tr class="separator:a776d6ae9b073c01388089c373b38d2f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac7c9793bfdcdaaea2317884b7cc6be0f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac7c9793bfdcdaaea2317884b7cc6be0f"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArDeviceConnection.html#ac7c9793bfdcdaaea2317884b7cc6be0f">setPortName</a> (const char *portName)</td></tr>
<tr class="memdesc:ac7c9793bfdcdaaea2317884b7cc6be0f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the port name. <br /></td></tr>
<tr class="separator:ac7c9793bfdcdaaea2317884b7cc6be0f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e10f03aabb179531d177f1004a88a1e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7e10f03aabb179531d177f1004a88a1e"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArDeviceConnection.html#a7e10f03aabb179531d177f1004a88a1e">setPortType</a> (const char *portType)</td></tr>
<tr class="memdesc:a7e10f03aabb179531d177f1004a88a1e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the port type. <br /></td></tr>
<tr class="separator:a7e10f03aabb179531d177f1004a88a1e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:af99c6065bd53e0dc98347dc92f906f9d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af99c6065bd53e0dc98347dc92f906f9d"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>myDCDebugBytesRead</b></td></tr>
<tr class="separator:af99c6065bd53e0dc98347dc92f906f9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad2f6e786c23c028d646d5463463ab97b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad2f6e786c23c028d646d5463463ab97b"></a>
<a class="el" href="classArTime.html">ArTime</a>&#160;</td><td class="memItemRight" valign="bottom"><b>myDCDebugFirstByteTime</b></td></tr>
<tr class="separator:ad2f6e786c23c028d646d5463463ab97b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a908a3a99408df65d22200bc4dbcd3ee9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a908a3a99408df65d22200bc4dbcd3ee9"></a>
<a class="el" href="classArTime.html">ArTime</a>&#160;</td><td class="memItemRight" valign="bottom"><b>myDCDebugLastByteTime</b></td></tr>
<tr class="separator:a908a3a99408df65d22200bc4dbcd3ee9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5491accdf349d9e90a1feacb0f8e0be0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5491accdf349d9e90a1feacb0f8e0be0"></a>
long long&#160;</td><td class="memItemRight" valign="bottom"><b>myDCDebugNumBadPackets</b></td></tr>
<tr class="separator:a5491accdf349d9e90a1feacb0f8e0be0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a11ee903b00660b50f45b0b0042814211"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a11ee903b00660b50f45b0b0042814211"></a>
long long&#160;</td><td class="memItemRight" valign="bottom"><b>myDCDebugNumGoodPackets</b></td></tr>
<tr class="separator:a11ee903b00660b50f45b0b0042814211"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a537ec452899503d15060b7728517690b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a537ec452899503d15060b7728517690b"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myDCDebugPacketStarted</b></td></tr>
<tr class="separator:a537ec452899503d15060b7728517690b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2727d941ea446a99d555b0281f903b59"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2727d941ea446a99d555b0281f903b59"></a>
<a class="el" href="classArTime.html">ArTime</a>&#160;</td><td class="memItemRight" valign="bottom"><b>myDCDebugStartTime</b></td></tr>
<tr class="separator:a2727d941ea446a99d555b0281f903b59"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada78fa17a93253b773d1bd467d33a1e6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ada78fa17a93253b773d1bd467d33a1e6"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>myDCDebugTimesRead</b></td></tr>
<tr class="separator:ada78fa17a93253b773d1bd467d33a1e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9db71e9fdb2c834e3d83999bf7d4919a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9db71e9fdb2c834e3d83999bf7d4919a"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>myDCDeviceName</b></td></tr>
<tr class="separator:a9db71e9fdb2c834e3d83999bf7d4919a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab81bf283a2eec4beb64d2a428dccab99"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab81bf283a2eec4beb64d2a428dccab99"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>myDCPortName</b></td></tr>
<tr class="separator:ab81bf283a2eec4beb64d2a428dccab99"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e69e51c7c82f8a21d3c2cadd499465d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0e69e51c7c82f8a21d3c2cadd499465d"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>myDCPortType</b></td></tr>
<tr class="separator:a0e69e51c7c82f8a21d3c2cadd499465d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-static-attribs"></a>
Static Protected Attributes</h2></td></tr>
<tr class="memitem:a8295d8f30b513dda5b207a4b5ad11573"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8295d8f30b513dda5b207a4b5ad11573"></a>
static <a class="el" href="classArTime.html">ArTime</a>&#160;</td><td class="memItemRight" valign="bottom"><b>ourDCDebugFirstTime</b></td></tr>
<tr class="separator:a8295d8f30b513dda5b207a4b5ad11573"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8810181d6514b20111dcf5432cb31573"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8810181d6514b20111dcf5432cb31573"></a>
static bool&#160;</td><td class="memItemRight" valign="bottom"><b>ourDCDebugShouldLog</b> = false</td></tr>
<tr class="separator:a8810181d6514b20111dcf5432cb31573"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad51c11cab5a66044585206d23de5381b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad51c11cab5a66044585206d23de5381b"></a>
static ArStrMap&#160;</td><td class="memItemRight" valign="bottom"><b>ourStrMap</b></td></tr>
<tr class="separator:ad51c11cab5a66044585206d23de5381b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c543c7225d411a2ee97927f4a0878a8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9c543c7225d411a2ee97927f4a0878a8"></a>
static bool&#160;</td><td class="memItemRight" valign="bottom"><b>ourStrMapInited</b> = false</td></tr>
<tr class="separator:a9c543c7225d411a2ee97927f4a0878a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Base class for device connections. </p>
<p>Base class for device connections, this is mostly for connections to the robot or simulator but could also be used for a connection to a laser or other device</p>
<p>Note that this is mostly a base class, so if you'll want to use one of the classes which inherit from this one... also note that in those classes is where you'll find setPort which sets the place the device connection will try to connect to... the inherited classes also have an open which returns more detailed information about the open attempt, and which takes the parameters for where to connect </p>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a class="anchor" id="a347c85b1f6dad521cabfbca6833712ab"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classArDeviceConnection.html#a347c85b1f6dad521cabfbca6833712ab">ArDeviceConnection::Status</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="a347c85b1f6dad521cabfbca6833712aba2a32337db15deac68c28c6c6073614f8"></a>STATUS_NEVER_OPENED&#160;</td><td class="fielddoc">
<p>Never opened. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a347c85b1f6dad521cabfbca6833712abaab61fc67dfa26013b7940bbac62449da"></a>STATUS_OPEN&#160;</td><td class="fielddoc">
<p>Currently open. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a347c85b1f6dad521cabfbca6833712aba57899a6a6454d556eb07b44d26d09ab2"></a>STATUS_OPEN_FAILED&#160;</td><td class="fielddoc">
<p>Tried to open, but failed. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a347c85b1f6dad521cabfbca6833712abad66561776078f16b133e18a67a31a6b2"></a>STATUS_CLOSED_NORMALLY&#160;</td><td class="fielddoc">
<p>Closed by a close call. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a347c85b1f6dad521cabfbca6833712aba3d77512ad91a4c2ff4c57ead86546aaf"></a>STATUS_CLOSED_ERROR&#160;</td><td class="fielddoc">
<p>Closed because of error. </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a17585f2fab7b9fb61d2308400f909c30"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ArDeviceConnection::ArDeviceConnection </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>constructor </p>
<p>Subclasses of this connection type should call setDCPortType in their constructor, then setDCPortName in their openPort.</p>
<p>Classes that use a device connection should call setDCDeviceName with the device the connection is attached too (usually in setDeviceConnection on the device)...</p>
<p>Things that read the port should call debugStartPacket whenever they are starting reading a packet... Then debugBytesRead with the byte count whenever they read or fail a read (0 if a read is failed)... Then debugEndPacket with a boolean for if the packet was a good one or a bad one and an integer that's postive for the type of packet (if successful) or negative to express why the read failed (if not successful). For the 'why the read failed' the values should be negative, and should all be unique (anywhere a read can return), preferably with a gap between the values, so that if more debugging is needed there are values in between the ones already there. Generally this information isn't used or computed, unless the global member <a class="el" href="classArDeviceConnection.html#a9a74569c1d73e65d215a80dbdc1b3394" title="Makes all device connections so that they&#39;ll dump data. ">ArDeviceConnection::debugShouldLog</a> is called to turn it on. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a9f701354a3cecec9e0b209a27e434f54"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool ArDeviceConnection::close </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Closes the connection. </p>
<dl class="section return"><dt>Returns</dt><dd>whether the close succeeded or not </dd></dl>

</div>
</div>
<a class="anchor" id="a1468143d5b41948b64d80cebce07c6f3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const char* ArDeviceConnection::getOpenMessage </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>messageNumber</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Gets the string of the message associated with opening the device. </p>
<p>Each class inherited from this one has an open method which returns 0 for success or an integer which can be passed into this function to obtain a string describing the reason for failure </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">messageNumber</td><td>the number returned from the open </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the error description associated with the messageNumber </dd></dl>

</div>
</div>
<a class="anchor" id="a3055120833c70ca8ba277040f0821d6f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int ArDeviceConnection::getStatus </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Gets the status of the connection, which is one of the enum status. </p>
<p>Gets the status of the connection, which is one of the enum status. If you want to get a string to go along with the number, use getStatusMessage </p><dl class="section return"><dt>Returns</dt><dd>the status of the connection </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classArDeviceConnection.html#ac0570caa674aceb844a25f29760a7315" title="Gets the description string associated with the status. ">getStatusMessage</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ac0570caa674aceb844a25f29760a7315"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char * ArDeviceConnection::getStatusMessage </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>messageNumber</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets the description string associated with the status. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">messageNumber</td><td>the int from getStatus you want the string for </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the description associated with the status </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classArDeviceConnection.html#a3055120833c70ca8ba277040f0821d6f" title="Gets the status of the connection, which is one of the enum status. ">getStatus</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a92e9eb8baf15711a5984453f4e35451d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classArTime.html">ArTime</a> ArDeviceConnection::getTimeRead </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>index</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Gets the time data was read in. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">index</td><td>looks like this is the index back in the number of bytes last read in </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the time the last read data was read in </dd></dl>

</div>
</div>
<a class="anchor" id="aacdcacf3635432296e6a5cf8f08e7e50"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool ArDeviceConnection::isTimeStamping </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>sees if timestamping is really going on or not </p>
<dl class="section return"><dt>Returns</dt><dd>true if real timestamping is happening, false otherwise </dd></dl>

</div>
</div>
<a class="anchor" id="a0c7aa57e4734df6287c0393bdf7c186f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int ArDeviceConnection::read </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>msWait</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Reads data from connection. </p>
<p>Reads data from connection </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>pointer to a character array to read the data into </td></tr>
    <tr><td class="paramname">size</td><td>maximum number of bytes to read </td></tr>
    <tr><td class="paramname">msWait</td><td>read blocks for this many milliseconds (not at all for == 0) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>number of bytes read, or -1 for failure </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classArDeviceConnection.html#ac9557146fcc027bef433c0d3807e82fa" title="Writes data to connection. ">write</a>, <a class="el" href="classArDeviceConnection.html#a5a3dd1cd4140ac04b4229dde26edf9de" title="Writes data to connection. ">writePacket</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ac9557146fcc027bef433c0d3807e82fa"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int ArDeviceConnection::write </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Writes data to connection. </p>
<p>Writes data to connection </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>pointer to a character array to write the data from </td></tr>
    <tr><td class="paramname">size</td><td>number of bytes to write </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>number of bytes read, or -1 for failure </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classArDeviceConnection.html#a0c7aa57e4734df6287c0393bdf7c186f" title="Reads data from connection. ">read</a>, <a class="el" href="classArDeviceConnection.html#a5a3dd1cd4140ac04b4229dde26edf9de" title="Writes data to connection. ">writePacket</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a5a3dd1cd4140ac04b4229dde26edf9de"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int ArDeviceConnection::writePacket </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArBasePacket.html">ArBasePacket</a> *&#160;</td>
          <td class="paramname"><em>packet</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Writes data to connection. </p>
<p>Writes data to connection from a packet </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">packet</td><td>pointer to a packet to write the data from </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>number of bytes written, or -1 for failure </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classArDeviceConnection.html#a0c7aa57e4734df6287c0393bdf7c186f" title="Reads data from connection. ">read</a>, <a class="el" href="classArDeviceConnection.html#ac9557146fcc027bef433c0d3807e82fa" title="Writes data to connection. ">write</a> </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>ArDeviceConnection.h</li>
<li>ArDeviceConnection.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="classArDeviceConnection.html">ArDeviceConnection</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
